<?php

namespace App\Http\Controllers;

use Illuminate\Foundation\Bus\DispatchesJobs;
use Illuminate\Foundation\Validation\ValidatesRequests;
use Illuminate\Foundation\Auth\Access\AuthorizesRequests;

use App\Models\Common\Output;
use View;

class AdminController extends Controller
{
    use AuthorizesRequests, DispatchesJobs, ValidatesRequests;

    private $theme = 'default';
    protected $output;

    public function __construct()
    {
        $this->middleware('auth');

        $this->output = new Output();

        //后台主题
        View::addNamespace("themeView", base_path() . '/resources/views/admin/' . $this->theme . '/');

        //前台定义
        View::share("themeAssetsPath", '/assets/admin/' . $this->theme . '/');
    }
}
